
public class ObjectExample implements Cloneable {

	int data;
	
	@Override
	public boolean equals(Object other){
		if(other == null){
			return false;
		}
		else if(other instanceof ObjectExample){
			ObjectExample oe = (ObjectExample) other;
			if(oe.data == this.data){
				return true;
			}
			
		}
		
		return false;
		
	}
	
	@Override
	public ObjectExample clone(){
		return new ObjectExample();
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		ObjectExample oe = new ObjectExample();
		oe.equals(null);
		oe = null;
		oe.equals(null);
	}

}
